package ooexercise04;
public abstract class Animal{
    String name;
    String color;
    int age;

    public Animal(String name, String color, int age) {
        this.name = name;
        this.color = color;
        this.age = age;
    }

    abstract void eat();

    void drink(){
        System.out.println(color+"色的"+age+"岁"+name+"在喝水……");
    }
}














/*
public abstract class Animal {
    String name;
    String color;
    int age;

    Animal(String name, String color, int age) {
        this.name = name;
        this.color = color;
        this.age = age;
    }

    abstract void eat();

    void drink(){
        System.out.println(color+"色的"+age+"岁"+name+"在喝水……");
    }
}

 */
